package mdt.ext;

import org.tigris.gef.presentation.FigText;
import mdt.action.SetFigShapeAttrAction;
import mdt.action.SetFigTextAttrAction;

import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.util.Vector;

/**
 * Created by xiaobyu on 7/19/2016.
 */
public class FigTextExt extends FigText{
    public FigTextExt(int x, int y, int w, int h, Color textColor, String familyName, int fontSize, boolean expandOnly) {
        super(x, y, w, h, textColor, familyName, fontSize, expandOnly);
    }

    public FigTextExt(int x, int y, int w, int h, Color textColor, String familyName, int fontSize) {
        super(x, y, w, h, textColor, familyName, fontSize);
    }

    public FigTextExt(int x, int y, int w, int h, Color textColor, Font font) {
        super(x, y, w, h, textColor, font);
    }

    public FigTextExt(int x, int y, int w, int h) {
        super(x, y, w, h);
    }

    public FigTextExt(int x, int y, int w, int h, boolean expandOnly) {
        super(x, y, w, h, expandOnly);
    }

    public Vector getPopUpActions(MouseEvent me) {
        Vector popUpActions = super.getPopUpActions(me);
        popUpActions.add(new JSeparator());
        popUpActions.add(new JMenuItem(new SetFigShapeAttrAction()));
        popUpActions.add(new JMenuItem(new SetFigTextAttrAction()));
        return popUpActions;
    }
}
